package com.maila.xiaoaoschool.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.GridView;
import android.widget.TextView;

import com.cjj.MaterialRefreshLayout;
import com.maila.xiaoaoschool.R;
import com.maila.xiaoaoschool.adapter.MallAdapter;
import com.maila.xiaoaoschool.widget.MyRadioHorizontalScrollView;
import com.zhy.autolayout.AutoLinearLayout;
import com.zhy.autolayout.AutoRelativeLayout;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/9/30.
 */

public class XiaoAoMallActivity extends AppCompatActivity {
    @BindView(R.id.white_return_iv)
    AutoRelativeLayout whiteReturnIv;
    @BindView(R.id.tv_shop_namee)
    TextView tvShopNamee;
    @BindView(R.id.ll_title)
    AutoLinearLayout llTitle;
    @BindView(R.id.rhv_mall)
    MyRadioHorizontalScrollView rhvMall;
    @BindView(R.id.lv_fujin)
    GridView lvFujin;
    @BindView(R.id.hot_refresh)
    MaterialRefreshLayout hotRefresh;
    MallAdapter mallAdapter;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mall);
        ButterKnife.bind(this);
        mallAdapter=new MallAdapter(this);
        lvFujin.setAdapter(mallAdapter);
        String[] tabTitle = gettabname();
        rhvMall.setSomeParam(tabTitle, tabTitle.length, this);
    }

    private String[] gettabname() {
        String[] tabtitle = new String[8];
        tabtitle[0] = "热门";
        tabtitle[1] = "男装";
        tabtitle[2] = "女装";
        tabtitle[3] = "零食";
        tabtitle[4] = "日用";
        tabtitle[5] = "数码";
        tabtitle[6] = "家居";
        tabtitle[7] = "教育";
        return tabtitle;

    }

    @OnClick(R.id.white_return_iv)
    public void onViewClicked() {
        finish();
    }
}
